/*
 *	This file is part of Lounge-Cast.
 *
 *  Author:  	Markus Moormann
 *	E-mail:  	mmoorman@uni-osnabrueck.de
 *	Copyright:	University of Osnabrueck (Zentrum Virtuos)
 * 	Website:	www.uni-osnabrueck.de
 *	Date:		16.02.2011
 *
 *	Lounge-Cast is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *	Lounge-Cast is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Lounge-Cast.  If not, see <http://www.gnu.org/licenses/>.
 */
package multimedia.model.vo
{
	/**
	 * class representing a Feed
	 */
	[Bindable]
	[RemoteClass(alias="backend.vo.FeedVO")]
	public class FeedVO
	{
		/**
		 * iternal if of the feed
		 */
		public var feed_id:uint;
		/**
		 * last date the feed items were updated
		 */
		public var last_update:Date;
		/**
		 * title of the feed
		 */
		public var title:String;
		/**
		 * the url of the feed
		 */
		public var url:String;
		/**
		 * trust level of the feed
		 * 1: all items are directly included
		 * 2: all items are directly excluded
		 */
		public var trust_level:uint;
		/**
		 * the date date the feed was added to database
		 */
		public var added:Date;
		/**
		 * the user who added the feed
		 */
		public var added_by:UserVO;
		/**
		 * the playlist the feed items are saved to 
		 * if <code>auto_save_to_playlist</code> is true
		 */
		public var playlist:PlaylistVO;
		/**
		 * if set to true all items are automatically saved
		 * to playlist
		 */
		public var auto_save_to_playlist:Boolean;
		/**
		 * the valid_date of the items
		 */
		public var feed_item_valid_time:uint; 
		/**
		 * duration of the media items
		 */
		public var feed_item_duration:uint;
		/**
		 * whether this feed should be added to newsticker
		 */
		public var add_to_newsticker:Boolean;
		/**
		 * the background color to show
		 */
		public var background_color:uint;
		/**
		 * the background image to show
		 */
		public var feed_item_background_image:String;
		/**
		 * margin from bottom
		 */
		public var feed_item_margin_bottom:Number;
		/**
		 * margin from left
		 */
		public var feed_item_margin_left:Number;
		/**
		 * margin from top
		 */
		public var feed_item_margin_top:Number;
		/**
		 * margin from right
		 */
		public var feed_item_margin_right:Number;
		
		/**
		 * constructor
		 * 
		 * @param url the URL pointing to the feed
		 * @param title the title of the feed
		 */
		public function FeedVO(url:String = null, title:String = null) 
		{
			this.url = url;
			this.title = title;
			this.playlist = new PlaylistVO();
			this.playlist.description = this.title + "-Feed";
		}
		
	}
}